package com.kwd.news.po;

import com.alibaba.fastjson.annotation.JSONType;

@JSONType(orders = {"name", "code", "sub"})
public class CityPicker implements Comparable<CityPicker> {

    private String name;

    private String code;

    private Object[] sub;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Object[] getSub() {
        return sub;
    }

    public void setSub(Object[] sub) {
        this.sub = sub;
    }

    @Override
    public int compareTo(CityPicker o) {
        int i = Integer.parseInt(this.getCode()) - Integer.parseInt(o.getCode());//先按照年龄排序
        return i;
    }
}
